package com.bonana.core.result;

import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.context.support.ResourceBundleMessageSource;

/**
 * Created by xiabin on 2016/8/17.
 */
public class ResponseMessageSource extends ResourceBundleMessageSource {
    //~ Constructors ===================================================================================================
    public ResponseMessageSource() {
        setAlwaysUseMessageFormat(true);
        setDefaultEncoding("UTF-8");
        setBasename("i18n.messages");
    }

    //~ Methods ========================================================================================================
    public static MessageSourceAccessor getAccessor() {
        return new MessageSourceAccessor(new ResponseMessageSource());
    }
}
